package com.example.ac36;

/**
 * @description AC 节点
 * @auther lijiewei
 * @date 2022/1/19 17:02
 */
public class AcNode {

    /** 存放的字符. */
    public char data;
    /** 字符集只包含 a-z 这26个字符. */
    public AcNode[] children = new AcNode[26];
    /** 结尾字符为 true. */
    public boolean isEndingChar = false;
    /** 当 isEndingChar=true 时，记录模式串长度. */
    public int length = -1;
    /** 失败指针. */
    public AcNode fail;

    public AcNode(char data) {
        this.data = data;
    }
}
